<template>
  <!-- Display a table with the provided data and columns -->
  <a-table :data="tableData" :bordered="true" :columns="columns" :pagination="false" />
</template>

<script lang="ts" setup>
import type { PropType } from 'vue';

defineProps({
  // The data for the table
  tableData: {
    type: Array as PropType<Record<string, any>[]>,
    required: true
  }
});

const columns = [
  {
    // The title for the "归属时间" column
    title: '归属时间',
    // The data index for the "归属时间" column
    dataIndex: 'belong_cycle'
  },
  {
    // The title for the "摊销进度" column
    title: '摊销进度',
    // The data index for the "摊销进度" column
    dataIndex: 'cycle_number'
  },
  {
    // The title for the "摊销金额" column
    title: '摊销金额',
    // The data index for the "摊销金额" column
    dataIndex: 'amount'
  },
  {
    // The title for the "操作时间" column
    title: '操作时间',
    // The data index for the "操作时间" column
    dataIndex: 'cycle_start_time'
  }
];
</script>
